load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//rs/crypto:__subpackages__"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/internal/logmon",
    "//rs/monitoring/metrics",
    "//rs/test_utilities/metrics",
]

MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = []

MACRO_DEV_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "metrics",
    testonly = True,
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_crypto_test_utils_metrics",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "metrics_test",
    aliases = ALIASES,
    crate = ":metrics",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)

rust_doc_test(
    name = "metrics_doc_test",
    crate = ":metrics",
)
